import * as icons from "@ant-design/icons";
import React from "react";
// 根据传递的Icon的名字动态引入Icon图标
export default function Icon(props: { icon: string }) {
  const { icon } = props;
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  const antIcon: { [key: string]: any } = icons;
  return React.createElement(antIcon[icon]);
}
